import request from '@/utils/request'
export function list(params) {
    return request({
        url: '/admin/product/list',
        method: 'get',
        params: params
    })
}

export function productList(params) {
    return request({
        url: '/product/list',
        method: 'get',
        params: params
    })
}

export function save(data,params) {
    return request({
        url:'/admin/product/save',
        method: 'post',
        data:data,
        params: params
    })
}
export function find(id) {
    return request({
        url:'/admin/product/find/'+id,
        method: 'get',
    })
}

export function update(data,params) {
    return request({
        url: '/admin/product/update',
        method: 'post',
        data: data,
        params: params
    })
}


export function updateProduct(data,params) {
    return request({
        url: '/admin/product/updateProduct',
        method: 'post',
        data: data,
        params: params
    })
}
export function del(ids) {
    return request({
        url: '/admin/product/del/' + ids,
        method: 'post'
    })
}

export function findBySn(params) {
    return request({
        url: '/admin/product/findBySn',
        method: 'get',
        params: params
    })
}


